package com.eqdd.yiqidian.test.widget;

import android.graphics.Canvas;
import android.graphics.Paint;

/**
 * Created by 吕志豪 on 17-10-11  下午5:17.
 * Github :https://github.com/lvzhihao100
 * E-Mail：1030753080@qq.com
 * 简书 :http://www.jianshu.com/u/6e525b929aac
 */

public class NormalDecorationDrawer implements DecorationDrawer {
    @Override
    public void drawVertical(Canvas c, String title, float left, float top, float right, float bottom,
                             Paint mBackgroundPaint, Paint mTextPaint, float baseLine, int mTitleHeight) {

        c.drawRect(left, top, right, bottom, mBackgroundPaint);

        c.drawText(title, 300, baseLine, mTextPaint);
    }

    @Override
    public void drawFlow(Canvas c, String title, float left, float top, float right, float bottom,
                         Paint mBackgroundPaint, Paint mTextPaint, float baseLine, int mTitleHeight) {

        c.drawRect(left, top, right, bottom, mBackgroundPaint);

        c.drawText(title, 300, baseLine, mTextPaint);
    }
}
